package com.nf.db.handlers;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Map;

public interface RowProcessor {
    RowProcessor DEFAULT_ROWPROCESSOR = new DefaultRowProcessor();

    Object[] toArray(ResultSet rs) throws SQLException;

    Map<String, Object> toMap(ResultSet rs) throws SQLException;

    <T> T toBean(ResultSet rs, Class<T> clazz) throws SQLException;

    <T> T toScalar(ResultSet rs, String columnName, Integer columnIndex) throws SQLException;
}
